<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>治电领导人寻迹系统</title>
	<style type="text/css">
		body, html{width: 100%;height: 100%;margin:0;font-family:"微软雅黑";}
		#allmap{height:800px;width:75%;float:right;}
 
	</style>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=dfXzQnlq8IH6Uq0GLqFbKzllfc3lfarM"></script>
</head>
<body>
		<div id="allmap"></div>
 
	<table id="liebiao" border="1" cellspacing="50">
		<a style="float:left;" href="index.html"><img src="fh.png" style="width:20px;height:20px;"></a><center style="margin:-10px;"><h4>治电领导人寻迹系统</h4></center>
		<tr><td>经度</td><td>纬度</td></tr>
	</table>
	


	<script src="bmob-min.js"></script>
	<script src="xunjimap.js"></script>
	<script type="text/javascript">

		Bmob.initialize("05297f9b328c80d8e9721c3f2c6ac49b", "289faf523899ee4e0b7e1d1942fa132b");//初始化bmob
		// 百度地图API功能
		var map = new BMap.Map("allmap");
		map.setMapStyle({style:'redalert'});
		var point = new BMap.Point(118.322389,32.261871);
		map.centerAndZoom(point, 14);
		map.enableScrollWheelZoom(true);
//图标	
    	function addMarker(point){
	  		var marker = new BMap.Marker(point);
	 		map.addOverlay(marker);
		}

       var test = Bmob.Object.extend("GameScore"); //链接表
       var query = new Bmob.Query(test);
       query.find({
       	success: function(results) {
       		for (var i = 0; i < results.length; i++) {
       			var object = results[i];
				var a=object.get("jin");
				var b=object.get("wei");
				var point1 = new BMap.Point(a,b);
				addMarker(point1);
       		}
       		var dd = results[0];
			var j=dd.get("jin");
			var w=dd.get("wei");
			var point = new BMap.Point(j,w);			
       	},
       	error: function(error) {
       		alert("error:" + error.code + "  " + error.message);
       	}
       })
			
	</script>
</body>
</html>